package org.study.r2dbc.boot.repository;

import org.springframework.data.r2dbc.repository.Query;
import org.springframework.data.r2dbc.repository.R2dbcRepository;
import org.study.r2dbc.boot.model.User;
import reactor.core.publisher.Flux;

/**
 * 作用描述
 *
 * @author doveylovey
 * @version v1.0.0
 * @email 1135782208@qq.com
 * @date 2025年04月01日
 */
public interface UserRepository extends R2dbcRepository<User, Long> {
    Flux<User> findByName(String name);

    Flux<User> findByEmail(String email);

    @Query("SELECT * FROM t_user WHERE age > :age")
    Flux<User> findByAgeGreaterThan(int age);
}
